package com.qingke.Qiximybatis.business;

import java.util.List;
import org.apache.ibatis.session.SqlSession;
import com.qingke.Qiximybatis.QixiDao;
import com.qingke.Qiximybatis.command.UserCommand;
import com.qingke.Qiximybatis.mapper.MyUserMapper;
import com.qingke.Qiximybatis.sqlclass.MyUser;

public class ListUser extends UserCommand{

	public ListUser(MyUser user) {
		super(user);
	}

	@Override
	public void executeUserCommand() {
		SqlSession session = QixiDao.mybatisSession();
		System.out.println("欢迎进入查询界面：");
		MyUserMapper userM = session.getMapper(MyUserMapper.class);
		List<MyUser> list = userM.listUser();
		for (MyUser myUser : list) {
			System.out.println(myUser);
		}
		System.out.println("************ 查询结束！  *****************");
	}


	
}
